
package Frontera;

// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 

import java.awt.Graphics;
import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageFilter;
import java.awt.image.ImageProducer;
import java.awt.image.ReplicateScaleFilter;

// #[regen=yes,id=DCE.A1666F7E-0A22-C28C-145E-E61E91AF42A1]
// </editor-fold> 
public class GUI extends java.applet.Applet
{
    public void ObtenerPuntos ()
    {}

    Image source;
    Image resizedImage;

    public void init()
    {
        MediaTracker media = new MediaTracker(this);
        // java how-to image for example, can be JPG
        source = getImage(getDocumentBase());
        media.addImage(source,0);
        try
        {
              media.waitForID(0);
              // scale down, half the original size
              ImageFilter replicate =
                 new ReplicateScaleFilter
                   (source.getWidth(this)/2, source.getHeight(this)/2);
              ImageProducer prod =
                 new FilteredImageSource(source.getSource(),replicate);
              resizedImage = createImage(prod);
              media.addImage(resizedImage,1);
              media.waitForID(1);
         }
        catch(InterruptedException e) {}
    }

  public void paint(Graphics g)
  {
    g.drawImage(source, 10,10,this);
    g.drawImage(resizedImage,10, 80,this);
  }
}//f GUI

